1a0d0bffa1174e7e361285b5dab8b622f6c7273f,squidlib-performance/src/main/java/squidpony/performance/DijkstraBenchmark.java,DijkstraBenchmark,doTinyPathCustomDijkstra,#,379
Before Change
((StatefulRNG) dijkstra.rng).setState((x << 20) | (y << 14) | (x * y));
r = nearbyMap[x][y];
p = adj.composite(r.x, r.y, 0, 0);
dijkstra.findPath(1, 9,null, null, p, adj.composite(x, y, 0, 0));
dijkstra.clearGoals();
dijkstra.resetMap();
scanned += dijkstra.path.size;
After Change
public long doTinyPathCustomDijkstra()
{
CustomDijkstraMap dijkstra = new CustomDijkstraMap(
map, adj, new StatefulRNG(new LightRNG(0x1337BEEF)));
Coord r;
int p;
long scanned = 0;
int[] tgts = new int[1];
for (int x = 1; x < DIMENSION - 1; x++) {
for (int y = 1; y < DIMENSION - 1; y++) {
if (map[x][y] == '#')
continue;
((StatefulRNG) dijkstra.rng).setState((x << 20) | (y << 14) | (x * y));
r = nearbyMap[x][y];
p = adj.composite(r.x, r.y, 0, 0);
tgts[0] = adj.composite(x, y, 0, 0);
dijkstra.findPath(1, 9,null, null, p, tgts);
dijkstra.clearGoals();
dijkstra.resetMap();
scanned += dijkstra.path.size;